<%@page import="pro.syj.bean.Student"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>写留言</title>
	<link rel='stylesheet' href='CSS/decorator1.css'>
</head>

<body>
	<%
		Student student = (Student)session.getAttribute("student");
	%>
	<h1>学生成绩&nbsp;<img src="Image/logo.png" class="logo">&nbsp;管理系统</h1>
    <hr>
    
	<form action="messageWrite-do-do.jsp" method="post" name="addForm" class="regist">
	<h1 class="form-title">写留言</h1>
	<p>I would like to receive your fine publication.</p>
	
	<ul>
	<li>
		<label>学号：</label>
		<input type="text" name=sid value=<%=student.getSid() %> placeholder=<%=student.getSid() %> disabled>
	</li>
	<li>
		<label>姓名：</label>
		<input type="text" name=sname value=<%=student.getSname() %> placeholder=<%=student.getSname() %> disabled>
	</li>
	<li>
		<label>留言内容：</label>
		<textarea name="content" cols=50 rows=10></textarea required>
	</li>
	<li>
		<input type="submit" onclick="return checkForm()" value="确认录入">
		<input type="reset">
		<div>
		<a href="javascript: window.history.go(-1)">  [返回上一级]</a>
		<a href="studentMain.jsp">[返回主界面]</a>
		</div>
	</li>
	</ul>
	</form>
	
	<script type="text/javascript">
    function checkForm() {
        var content = addForm.content.value;
        //alert(name + pwd + repwd);
        if (content == "" || content == null) {
            alert("留言内容不能为空！");
            addForm.content.focus();
            return false;
        }
        alert('录入成功！');
        return true;
    }
	</script>
</body>
</html>